package it.koutifaris.travianmap.dal.sqlservices.tile;

import it.koutifaris.travianmap.model.Village;
import it.koutifaris.travianmap.tile.Tile;
import it.koutifaris.travianmap.tile.TileBounds;

import java.util.Collections;
import java.util.List;

public class SqlTile implements Tile {

	private final List<Village> villages;
	private final TileBounds bounds;

	public SqlTile(List<Village> villages, TileBounds bounds) {
		this.villages = Collections.unmodifiableList(villages);
		this.bounds = bounds;
	}

	@Override
	public Iterable<Village> getVillages() {
		return villages;
	}

	@Override
	public int getNumberOfVillages() {
		return villages.size();
	}

	@Override
	public TileBounds getBounds() {
		return bounds;
	}

}
